Field of the Invention
The present invention relates to an encoder including with an origin position detection function.
Description of the Related Art
An encoder has been recently used to detect a position and a velocity. As one example of the encoder, an incremental encoder has been known. The incremental encoder detects a position using a counter on the basis of relative displacement between a scale and a sensor, but, immediately after power on, fails to detect the position due to reset of the counter. Accordingly, the sensor and the scale are displaced relatively to detect an origin position immediately after power on, and the counter is reset when the origin position is detected using an origin signal. This is referred to as origin detection. After the origin detection, position detection from the origin position can be performed. In Japanese Patent No. 5639421, an origin position is detected when amplitude of a signal for displacement detection is smaller than a threshold value on the basis of a discontinuous part provided on a part of a pattern of a scale for displacement detection.
However, in Japanese Patent No. 5639421, when amplitude of the signal for displacement detection decreases in a whole system, a position where the amplitude is smaller than the threshold vale changes and as a result, the origin position may be wrongly detected.